﻿@model IEnumerable<BudgetApp.Data.Models.Category>

@{
    ViewBag.Title = "Index";
}

<div class="col-md-12">
    <h2>Index</h2>

    <p>
        @Html.ActionLink("Back to Track Spending", "Create", "Spending")
    </p>
    <p>
        @Html.ActionLink("Back to Track Budget", "Create", "Budgeting")
    </p>
    <p>
        @Html.ActionLink("Create New", "Create")
    </p>
    <table class="table">
        <tr>
            <th>
                @Html.DisplayNameFor(model => model.CategoryType)
            </th>
            <th></th>
        </tr>

        @foreach (var item in Model)
        {
            <tr>
                <td>
                    @Html.DisplayFor(modelItem => item.CategoryType)
                </td>
                <td>
                    @Html.ActionLink("Edit", "Edit", new {id = item.CategoryId}) |
                    @Html.ActionLink("Delete", "Delete", new {id = item.CategoryId})
                </td>
            </tr>
        }

    </table>
</div>

